/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.duricomeilmetallo.jpdp8;
/**
 *
 * @author DCM
 */
public class PDP8 {
    static Processor cpu = new Processor();
    static Memory ram = new Memory();
    void fetch() {
        fetch(false);
    }

    void fetch(boolean stepByStep) {
        try {
        ram.mar.assign(cpu.pc);
        //todo ram.leggi();
        cpu.pc.increment();
        for (int i=0;i<3;i++) {
        cpu.opr.array[i]=ram.mbr.array[i+1];
        }
        cpu.i.array[0]=ram.mbr.array[0];
        }
        catch (IncompatibleLengthException e) { }
    }
}
